package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.oa.core.entity.common.FileManage;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * Created by ZhuChunXiao on 2017/6/1.
 */
@Entity
@Table(name="ec_orderentity")
public class OrderEntity extends BaseFlowEntity {
    private static final long serialVersionUID = 4008803772053186054L;

    /**
     * 合同信息表
     */
    //TODO 合同信息表实体类
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 订单金额 小数保留两位
     */
    private Double money;
    /**
     * 订单具体需求
     */
    private String content;
    /**
     * 相关附件
     */
    private List<FileManage> file;
    /**
     * 订单下达时间
     */
    private Date issuedDate;
    /**
     * 期望交付时间
     */
    private Date deliverDate;
    /**
     * 备注
     */
    private String remarks;
    /**
     * 是否有障碍并且未克服
     */
    private boolean red;
    /**
     * 是否已取消
     */
    private boolean cancel;
    /**
     * 是否已暂停
     */
    private boolean suspend;
    /**
     * 是否已完成
     */
    private boolean finish;
    /**
     * 完成率
     */
    private Integer rate;
    /**
     * 最新跟踪时间
     */
    private Date trackDate;
    /**
     * 暂停日期
     */
    private Date suspendDate;
    /**
     * 取消日期
     */
    private Date cancelDate;
    /**
     * 订单完成时间
     */
    private Date finishDate;
    /**
     * 完成情况说明
     */
    private String finishText;
    /**
     * 文档状态数值
     */
    private int numStatus;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "ec_orderentity_file", joinColumns = @JoinColumn(name="id"),inverseJoinColumns = @JoinColumn(name="fileId"))
    public List<FileManage> getFile() {
        return file;
    }

    public void setFile(List<FileManage> file) {
        this.file = file;
    }

    public Date getIssuedDate() {
        return issuedDate;
    }

    public void setIssuedDate(Date issuedDate) {
        this.issuedDate = issuedDate;
    }

    public Date getDeliverDate() {
        return deliverDate;
    }

    public void setDeliverDate(Date deliverDate) {
        this.deliverDate = deliverDate;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public boolean isRed() {
        return red;
    }

    public void setRed(boolean red) {
        this.red = red;
    }

    public boolean isCancel() {
        return cancel;
    }

    public void setCancel(boolean cancel) {
        this.cancel = cancel;
    }

    public boolean isSuspend() {
        return suspend;
    }

    public void setSuspend(boolean suspend) {
        this.suspend = suspend;
    }

    public boolean isFinish() {
        return finish;
    }

    public void setFinish(boolean finish) {
        this.finish = finish;
    }

    public Integer getRate() {
        return rate;
    }

    public void setRate(Integer rate) {
        this.rate = rate;
    }

    public Date getTrackDate() {
        return trackDate;
    }

    public void setTrackDate(Date trackDate) {
        this.trackDate = trackDate;
    }

    public Date getSuspendDate() {
        return suspendDate;
    }

    public void setSuspendDate(Date suspendDate) {
        this.suspendDate = suspendDate;
    }

    public Date getCancelDate() {
        return cancelDate;
    }

    public void setCancelDate(Date cancelDate) {
        this.cancelDate = cancelDate;
    }

    public Date getFinishDate() {
        return finishDate;
    }

    public void setFinishDate(Date finishDate) {
        this.finishDate = finishDate;
    }

    public String getFinishText() {
        return finishText;
    }

    public void setFinishText(String finishText) {
        this.finishText = finishText;
    }

    public int getNumStatus() {
        return numStatus;
    }

    public void setNumStatus(int numStatus) {
        this.numStatus = numStatus;
    }
}
